<script setup>
import Demo12PropsDemo01Children01 from './demo12-props-demo01-children01.vue';
import Demo12PropsDemo01Children02 from './demo12-props-demo01-children02.vue';
</script>
<template>
<h2>demo12-props-demo01.vue</h2>
<zhtt-card title="为属性指定类型">
  <Demo12PropsDemo01Children01
      title="这是字符串类型"
      age="12"
      isMan="true"
      :names="names"
      :author="author"
      :callback="callback"
  ></Demo12PropsDemo01Children01>
</zhtt-card>

  <zhtt-card title="对象指定类型、默认值">
    <Demo12PropsDemo01Children02
        :names="name2"
        :callback="callback"
    ></Demo12PropsDemo01Children02>
  </zhtt-card>
</template>
<script>
export default {
  data(){
    return {
      names:['Hello',1,2,{age:12}],
      name2:['Hello',1],
      author:{name:'李白',age:12}
    }
  },
  methods:{
    callback(){
      alert('callback');
    }
  }
}
</script>
